home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audio / ALgetparams.z / ALgetparams
Encoding:
Text File  |  1998-10-20  |  13.0 KB  |  265 lines

  1.  
  2.  
  3.  
  4. AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ALgetparams, ALsetparams - (obsolete) get/set the value of the specified
  10.      audio device states
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiioooo....hhhh>>>>
  14.  
  15.      iiiinnnntttt AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((lllloooonnnngggg ddddeeeevvvviiiicccceeee,,,, lllloooonnnngggg ****PPPPVVVVbbbbuuuuffffffffeeeerrrr,,,, lllloooonnnngggg bbbbuuuuffffffffeeeerrrrlllleeeennnnggggtttthhhh))))
  16.  
  17.      iiiinnnntttt AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss((((lllloooonnnngggg ddddeeeevvvviiiicccceeee,,,, lllloooonnnngggg ****PPPPVVVVbbbbuuuuffffffffeeeerrrr,,,, lllloooonnnngggg bbbbuuuuffffffffeeeerrrrlllleeeennnnggggtttthhhh))))
  18.  
  19. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  20.      _d_e_v_i_c_e         expects the device to which this command applies.
  21.                     Currently, there is only one device, AL_DEFAULT_DEVICE.
  22.  
  23.      _P_V_b_u_f_f_e_r       expects an array of longs.  The even elements of this
  24.                     array should each contain a device state variable that you
  25.                     choose to read or change. The subsequent odd elements are
  26.                     the current or new value of these variables.
  27.  
  28.      _b_u_f_f_e_r_l_e_n_g_t_h   expects the number of longs in the buffer pointed to by
  29.                     _P_V_b_u_f_f_e_r.  This value must be even.
  30.  
  31. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  32.      AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss and AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss are obsolete and are provided for backward
  33.      compatibility. The preferred functions are aaaallllGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) and
  34.      aaaallllSSSSeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))).
  35.  
  36.      AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) returns the current values for the device state
  37.      variables referenced in the _P_V_b_u_f_f_e_r array.  The values are written into
  38.      the odd locations of _P_V_b_u_f_f_e_r immediately after the corresponding state
  39.      variable.  Unrecognized parameters are ignored.
  40.  
  41.      AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) sets the current state of the device state variables
  42.      referenced in the _P_V_b_u_f_f_e_r array. Unrecognized parameters are ignored.
  43.  
  44.      Since the audio system is a shared resource, changing the value of a
  45.      system parameter with AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) may affect other programs
  46.      adversely.  For example, changing the input sample rate could cause an
  47.      undesired effect for a program currently sampling input data. In general
  48.      it is a good practice to determine whether other audio applications are
  49.      currently active by retrieving the number of open input/output audio
  50.      ports (see AL_INPUT_COUNT and AL_OUTPUT_COUNT below).
  51.  
  52.      The currently defined set of device parameters are defined in _a_u_d_i_o._h:
  53.      [not all parameters are present on all systems]
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.           AL_INPUT_SOURCE
  75.                AL_INPUT_LINE, AL_INPUT_MIC, or AL_INPUT_DIGITAL
  76.           AL_LEFT_INPUT_ATTEN
  77.                0 to 255 0=no attenuation, 255=maximum attenuation
  78.           AL_RIGHT_INPUT_ATTEN
  79.                0 to 255 0=no attenuation, 255=maximum attenuation
  80.           AL_INPUT_RATE
  81.                Sample rate of analog inputs. Positive values indicate sample rate
  82.                in Hz. Negative values indicate the rate value is a
  83.                logical value as opposed to a numeric one. Logical values include:
  84.                AL_RATE_AES1=set input analog sample rate to be identical to the
  85.                input digital stream sample rate. Future hardware may provide
  86.                additional logical rates.
  87.           AL_OUTPUT_RATE
  88.                Positive values indicate sample rate in Hz.
  89.                Negative values indicate the rate value is a logical value as
  90.                opposed to a numeric one. Logical values include:
  91.                AL_RATE_INPUTRATE=set output sample rate to be identical to
  92.                the input sample rate.
  93.                AL_RATE_AES1=set output sample rate to be identical to the
  94.                input digital stream sample rate.
  95.                Future hardware may provide additional logical rates.
  96.           AL_LEFT_SPEAKER_GAIN
  97.                0 to 255 0=off, 255=maximum volume.
  98.                This also affects the headphone output.
  99.           AL_RIGHT_SPEAKER_GAIN
  100.                0 to 255 0=off, 255=maximum volume
  101.                This also affects the headphone output.
  102.           AL_INPUT_COUNT
  103.                read-only.  It contains the number of open input ALports.
  104.           AL_OUTPUT_COUNT
  105.                read-only.  It contains the number of open output ALports.
  106.           AL_UNUSED_COUNT
  107.                read-only.  It contains the number of unopened ALports.
  108.           AL_SYNC_INPUT_TO_AES
  109.                _T_h_i_s _p_a_r_a_m_e_t_e_r _i_s _o_b_s_o_l_e_t_e. _0 _i_s _a_l_w_a_y_s _r_e_t_u_r_n_e_d.
  110.                1=sync to digital input clock, 0=use internal clock.
  111.           AL_SYNC_OUTPUT_TO_AES
  112.                _T_h_i_s _p_a_r_a_m_e_t_e_r _i_s _o_b_s_o_l_e_t_e. _0 _i_s _a_l_w_a_y_s _r_e_t_u_r_n_e_d.
  113.                1=sync to digital input clock, 0=use internal clock.
  114.           AL_MONITOR_CTL
  115.                Enabling monitoring causes a copy of the input stream to be
  116.                copied directly to the output of the audio system with minimal
  117.                delay. The parameter AL_MONITOR_CTL can take the following
  118.                values:
  119.                   AL_MONITOR_ON=enables monitoring of audio.
  120.                   AL_MONITOR_OFF=disables monitoring of audio.
  121.           AL_LEFT_MONITOR_ATTEN
  122.                _I_n_d_i_g_o _a_n_d _4_D/_3_5 _o_n_l_y.
  123.                   0 to 255 where 0=no attenuation and 255=maximum attenuation
  124.           AL_RIGHT_MONITOR_ATTEN
  125.                _I_n_d_i_g_o _a_n_d _4_D/_3_5 _o_n_l_y.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.                   0 to 255 where 0=no attenuation and 255=maximum attenuation
  141.           AL_CHANNEL_MODE
  142.                _I_n_d_i_g_o_2 _a_n_d _I_n_d_y _o_n_l_y.
  143.                AL_STEREO=configure hardware for stereo audio.
  144.                AL_4CHANNEL=configure hardware for 4-channel audio.
  145.           AL_SPEAKER_MUTE_CTL
  146.                AL_SPEAKER_MUTE_ON=speaker and headphones muted.
  147.                AL_SPEAKER_MUTE_OFF=speaker and headphones unmuted.
  148.           AL_MIC_MODE
  149.                _I_n_d_i_g_o_2 _a_n_d _I_n_d_y _o_n_l_y.
  150.                AL_MONO or AL_STEREO
  151.           AL_DIGITAL_INPUT_RATE
  152.                _I_n_d_i_g_o_2 _a_n_d _I_n_d_y _o_n_l_y.
  153.                read-only. Positive values indicate sample rate in Hz. Negative
  154.                value indicates a logical rate (viz., AL_RATE_UNDEFINED). The
  155.                digital input rate is encoded in the input digital audio
  156.                stream, which can change over time.
  157.                Logical rates:
  158.                AL_RATE_UNDEFINED=digital input signal valid, but rate
  159.                not encoded in signal
  160.                AL_RATE_UNACQUIRED=digital input signal valid, but rate
  161.                not yet acquired from input signal
  162.                AL_RATE_NO_DIGITAL_INPUT=digital input signal not valid
  163.           AL_LEFT2_INPUT_ATTEN
  164.                _I_n_d_i_g_o_2 _a_n_d _I_n_d_y _o_n_l_y.
  165.                0 to 255 0=no attenuation, 255=maximum attenuation
  166.                This parameter is available on systems with 4-channel capability
  167.                only.
  168.           AL_RIGHT2_INPUT_ATTEN
  169.                _I_n_d_i_g_o_2 _a_n_d _I_n_d_y _o_n_l_y.
  170.                0 to 255 0=no attenuation, 255=maximum attenuation
  171.                This parameter is available on systems with 4-channel capability
  172.                only.
  173.  
  174.  
  175. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  176.                #include <dmedia/audio.h>
  177.                ...
  178.                /* Set the speaker gains to 128 */
  179.                long buf[4] = {
  180.                     AL_LEFT_SPEAKER_GAIN, 128,
  181.                     AL_RIGHT_SPEAKER_GAIN, 128
  182.                };
  183.                ALsetparams(AL_DEFAULT_DEVICE,buf,4);
  184.  
  185.  
  186.      AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) and AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) can fail for the following reasons:
  187.  
  188.      AAAALLLL____BBBBAAAADDDD____DDDDEEEEVVVVIIIICCCCEEEE             _d_e_v_i_c_e is not AL_DEFAULT_DEVICE.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))                                              AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm))))
  203.  
  204.  
  205.  
  206.      AAAALLLL____BBBBAAAADDDD____PPPPVVVVBBBBUUUUFFFFFFFFEEEERRRR           _P_V_b_u_f_f_e_r is null (0) valued.
  207.  
  208.      AAAALLLL____BBBBAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRRLLLLEEEENNNNGGGGTTTTHHHH____NNNNEEEEGGGG   _b_u_f_f_e_r_l_e_n_g_t_h is negative.
  209.  
  210.      AAAALLLL____BBBBAAAADDDD____BBBBUUUUFFFFFFFFEEEERRRRLLLLEEEENNNNGGGGTTTTHHHH____OOOODDDDDDDD   _b_u_f_f_e_r_l_e_n_g_t_h is odd.
  211.  
  212.      AAAALLLL____BBBBAAAADDDD____DDDDEEEEVVVVIIIICCCCEEEE____AAAACCCCCCCCEEEESSSSSSSS      audio hardware is inaccessible.
  213.  
  214. NNNNOOOOTTTTEEEE
  215.      Setting AL_LEFT_SPEAKER_GAIN or AL_RIGHT_SPEAKER_GAIN automatically sets
  216.      AL_SPEAKER_MUTE_CTL to AL_SPEAKER_MUTE_OFF.
  217.  
  218.      Setting AL_CHANNEL_MODE to AL_4CHANNEL causes the input and output sample
  219.      rates to be identical.
  220.  
  221.      When AL_CHANNEL_MODE is set to AL_4CHANNEL, the AL_INPUT_SOURCE parameter
  222.      controls the behavior of the second set of analog inputs (normally the
  223.      microphone input). In this state, the normal line-level inputs are always
  224.      active. Setting AL_INPUT_SOURCE to AL_INPUT_MIC causes the second set of
  225.      inputs to be mic-level. Setting AL_INPUT_SOURCE to AL_INPUT_LINE causes
  226.      the second set of analog inputs to be line-level.
  227.  
  228. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  229.      Upon successful completion, AAAALLLLggggeeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) and AAAALLLLsssseeeettttppppaaaarrrraaaammmmssss((((3333ddddmmmm)))) return
  230.      0. Otherwise, these functions return -1 and set an error number which can
  231.      be retrieved with oooosssseeeerrrrrrrroooorrrr((((3333CCCC)))).
  232.  
  233.  
  234. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  235.      ALqueryparams(3dm), ALgetminmax(3dm), ALgetdefault(3dm), ALgetname(3dm),
  236.      oserror(3C)
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.